from Base import Base
from selenium.webdriver.common.by import By

class Page2(Base):
    # 月考0617
    yk0617 = (By.XPATH, '/html/body/div/div/section/aside/ul/li[3]/div/span')
    def yk_click(self):
        self.click(self.yk0617)
    # 客户列表
    custlist = (By.XPATH, '/html/body/div[1]/div/section/aside/ul/li[3]/ul/li[2]/a')
    def cl_click(self):
        self.click(self.custlist)
    # 添加
    addcust= (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div/div[2]/div/div/button[2]/span')
    def click_addcust(self):
        self.click(self.addcust)
    # 输入客户姓名
    custname = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[1]/div/div[1]/div/input')
    def send_custname(self,s):
        self.send_keys(self.custname,s)
    # 公司名称
    company_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[2]/div/div/div/input')
    def send_company(self,s):
        self.send_keys(self.company_loc,s)
    # 联系人
    people_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[3]/div/div/div/input')
    def send_people(self, s):
        self.send_keys(self.people_loc, s)
    # 电子邮件
    email_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[4]/div/div/div/input')
    def send_email(self, s):
        self.send_keys(self.email_loc, s)
    # 联系电话
    phone_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[5]/div/div/div/input')
    def send_phone(self, s):
        self.send_keys(self.phone_loc, s)
    # 提交
    tijiao_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div[6]/div/button[1]/span')
    def click_tijiao(self):
        self.click(self.tijiao_loc)
    # 断言-客户列表
    dy_custlist = (By.XPATH, '/html/body/div[1]/div/section/section/main/h1')